<include file="Member:leftmenu" />
<script src="__STATIC__admin/js/laydate/laydate.js"></script>
<style>
  .wxtables td .btn {padding: 0px 6px;}
  #J_wx_fans{ vertical-align:-2px; margin-top:5px;}	
  .select.mini.new{ width:140px;}
  input.mini.Wdate{ width:100px;}
  </style>
<div class="content-right fl">

    <h1 class="content-right-title">会员列表
	</h1>
    
    <div class="tablesWrap">
        <form action="" method="get" name="form1">
	    <div class="tables-searchbox">
	    
	   			 <input type="text" class="input mini" name="user_id" value="<?php echo get('user_id');?>" placeholder="用户ID">
                <input type="text" class="input" name="nickname" value="<?php echo get('nickname');?>" placeholder="姓名/微信昵称">
                <input type="hidden" name="p" value="1">

                
                <select name="grade_id" class="select mini new">
                    <option value="" selected="">所有等级</option>
                    
                    <?php foreach($grade_arr as $k=>$v){ ?>
                    <option value="<?php echo $k;?>"  <?php if($k==get('grade_id')){echo "selected";}?>><?php echo $v;?></option>
      				<?php } ?>
      				
                </select>
                


                <input type="text" name="start_create_time" id="start_create_time" value="<?php echo get('start_create_time');?>" placeholder="注册时间" class="input mini Wdate">
                <span class="mgr5">至</span>
                <input type="text" name="end_create_time" id="end_create_time" value="<?php echo get('end_create_time');?>" placeholder="注册时间" class="input mini Wdate">

                <button class="btn btn-primary" >
						<i class="gicon-search white"></i>查询</button>
                <a href="/admin/member/index" class="btn btn-warning">清除查询</a>
                
         </div>
	        <div>
	        
            </div>
            </form>
	    </div>
	    <!-- end tables-searchbox -->
	    <table class="wxtables" style="margin-top:10px;">  
            <colgroup>  
                
                <col width="5%">
                <col width="5%">
                <col width="5%">
                <col width="6%">
                <col width="6%">
                <col width="6%">
                <col width="4%">
                <col width="4%">
                <col width="4%">
                <col width="7%">
                <col width="7%">
                <col width="6%">
                <col width="6%">
                <col width="5%">
                <col width="7%">
                <col width="6%">
                <col width="6%">
                <col width="10%">
            </colgroup>  
            <thead>
                <tr>  
                	<td>会员头像</td>
                	<td>ID</td>
                    <td>昵称</td>
                    <td>等级</td>
                    <td>上级</td>
                    <td>上级ID</td>
                    <td>1级</td>
                    <td>2级</td>
                    <td>3级</td>
                    <td>消费金额</td>
                    <td>销售金额</td>
                    <td>可提现佣金</td>
                    <td>已提现佣金</td>
                    <td>微币</td>
                    <td>剩余支持面膜</td>
                    <td>加入时间</td>
                    <td>来源</td>
                    <td>操作</td>
                </tr> 
            </thead>
            <tbody>
            
            <?php foreach($datalist as $k=>$v){ ?>
                <tr>
                	<!-- <td><input type="checkbox" class="checkbox table-ckbs" data-id="2418042"></td>-->
                	<td><img src="<?php echo $v['headimgurl'];?>" width="60" height="60"  onerror="javascript:this.src='__STATIC__/admin/images/error.png';" ></td> 
                    <td><?php echo $v['uid'];?></td>
                    <td><?php echo $v['nickname'];?></td>
                    <td><?php echo $v['grade_name'];?></td>
                    <td><?php echo $v['refer_nickname'];?></td>
                    <td><?php echo $v['refer_uid'];?></td>
                    <td><a style="color:blue;" href="/admin/member/daili/?daili_user_id=<?php echo $v['uid'];?>&dj=1"><?php echo $v['daili_count'][1];?></a></td>
                    <td><a style="color:blue;" href="/admin/member/daili/?daili_user_id=<?php echo $v['uid'];?>&dj=2"><?php echo $v['daili_count'][2];?></a></td>
                    <td><a style="color:blue;" href="/admin/member/daili/?daili_user_id=<?php echo $v['uid'];?>&dj=3"><?php echo $v['daili_count'][3];?></a></td>
                    <td><?php echo $v['xiaofei'];?></td>
                    <td><?php echo $v['xiaoshou'];?></td>
                    
                    <td><?php echo $v['money'];?></td>
                    <td><?php echo $v['tixian'];?></td>
                    <td><?php echo $v['score'];?></td>
                    
                    <td><?php echo $v['minamo'];?></td>
                    <td><?php echo $v['create_time'];?></td>
                    <td><?php echo $v['laiyuan'];?></td>
                    <td></td>
				</tr>
			<?php } ?>

			</tbody>
        </table>
        
	<div class="tables-btmctrl clearfix">
           <div class="mgt10">
               <div class="paginate">
                  {$page}
               </div>
           </div>
	</div>
        
        
</div>

<script>
	var start = {
		elem : '#start_create_time',
		format : 'YYYY-MM-DD hh:mm:ss',
		min : '2015-11-01 00:00:00', //设定最小日期
		max : laydate.now(), //最大日期为当前日期
		istime : true,
		istoday : false,
		choose : function(datas) {
			end.min = datas; //开始日选好后，重置结束日的最小日期
			end.start = datas //将结束日的初始值设定为开始日
		}
	};
	var end = {
		elem : '#end_create_time',
		format : 'YYYY-MM-DD hh:mm:ss',
		min : '2015-11-01 00:00:00', //设定最小日期
		max : laydate.now(),
		istime : true,
		istoday : false,
		choose : function(datas) {
			start.max = datas; //结束日选好后，重置开始日的最大日期
		}
	};
	laydate(start);
	laydate(end);
</script>
